inherited crdToDo: TcrdToDo
  Left = 620
  Top = 235
  BorderStyle = bsDialog
  Caption = #1056#1072#1073#1086#1090#1072' '#1087#1086' '#1076#1086#1083#1075#1091
  ClientHeight = 482
  ClientWidth = 590
  ExplicitWidth = 596
  ExplicitHeight = 510
  PixelsPerInch = 96
  TextHeight = 13
  inherited Panel1: TPanel
    Top = 442
    Width = 590
    ExplicitTop = 442
    ExplicitWidth = 590
  end
  inherited GroupBox1: TGroupBox
    Width = 590
    ExplicitWidth = 590
    inherited DBEditEh1: TDBEditEh
      Height = 19
      Color = clWindow
      ExplicitHeight = 19
    end
    inherited DBEditEh2: TDBEditEh
      Height = 19
      Color = clWindow
      ExplicitHeight = 19
    end
    inherited DBEditEh3: TDBEditEh
      Height = 19
      Color = clWindow
      ExplicitHeight = 19
    end
  end
  object GroupBox2: TGroupBox [2]
    Left = 0
    Top = 84
    Width = 590
    Height = 299
    Align = alClient
    Caption = ' '#1056#1072#1073#1086#1090#1072' '
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -11
    Font.Name = 'MS Sans Serif'
    Font.Style = [fsBold]
    ParentFont = False
    TabOrder = 2
    object Panel2: TPanel
      Left = 2
      Top = 214
      Width = 586
      Height = 83
      Align = alClient
      BevelOuter = bvNone
      TabOrder = 0
      object Panel3: TPanel
        Left = 0
        Top = 0
        Width = 142
        Height = 83
        Align = alLeft
        BevelOuter = bvNone
        TabOrder = 0
        object Label11: TLabel
          Left = 90
          Top = 1
          Width = 44
          Height = 13
          Caption = #1047#1072#1084#1077#1090#1082#1080
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'MS Sans Serif'
          Font.Style = []
          ParentFont = False
        end
      end
      object Panel4: TPanel
        Left = 142
        Top = 0
        Width = 444
        Height = 83
        Align = alClient
        BevelOuter = bvLowered
        Caption = 'Panel4'
        TabOrder = 1
        object DBMemo1: TDBMemo
          Left = 1
          Top = 1
          Width = 442
          Height = 81
          Align = alClient
          BorderStyle = bsNone
          DataField = 'NOTES'
          DataSource = dscToDo
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'MS Sans Serif'
          Font.Style = []
          ParentFont = False
          TabOrder = 0
        end
      end
    end
    object Panel5: TPanel
      Left = 2
      Top = 15
      Width = 586
      Height = 199
      Align = alTop
      BevelOuter = bvNone
      TabOrder = 1
      object Label4: TLabel
        Left = 86
        Top = 3
        Width = 50
        Height = 13
        Alignment = taRightJustify
        Caption = #1053#1072#1079#1074#1072#1085#1080#1077
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        ParentFont = False
      end
      object Label5: TLabel
        Left = 97
        Top = 47
        Width = 39
        Height = 13
        Alignment = taRightJustify
        Caption = #1053#1072' '#1076#1072#1090#1091
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        ParentFont = False
      end
      object Label6: TLabel
        Left = 79
        Top = 113
        Width = 57
        Height = 13
        Alignment = taRightJustify
        Caption = #1042#1099#1087#1086#1083#1085#1077#1085#1072
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        ParentFont = False
      end
      object Label7: TLabel
        Left = 86
        Top = 69
        Width = 50
        Height = 13
        Alignment = taRightJustify
        Caption = #1057#1088#1086#1095#1085#1072#1103
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clRed
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = [fsBold]
        ParentFont = False
      end
      object Label8: TLabel
        Left = 21
        Top = 25
        Width = 115
        Height = 13
        Alignment = taRightJustify
        Caption = #1053#1072#1079#1085#1072#1095#1077#1085#1072' '#1089#1086#1090#1088#1091#1076#1085#1080#1082#1091
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        ParentFont = False
      end
      object Label9: TLabel
        Left = 10
        Top = 135
        Width = 126
        Height = 13
        Alignment = taRightJustify
        Caption = #1042#1099#1087#1086#1083#1085#1077#1085#1072' '#1089#1086#1090#1088#1091#1076#1085#1080#1082#1086#1084
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        ParentFont = False
      end
      object Label10: TLabel
        Left = 45
        Top = 157
        Width = 91
        Height = 13
        Alignment = taRightJustify
        Caption = #1044#1072#1090#1072' '#1074#1099#1087#1086#1083#1085#1077#1085#1080#1103
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        ParentFont = False
      end
      object Label13: TLabel
        Left = 102
        Top = 88
        Width = 34
        Height = 13
        Alignment = taRightJustify
        Caption = #1057#1091#1084#1084#1072
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        ParentFont = False
      end
      object Label12: TLabel
        Left = 34
        Top = 179
        Width = 102
        Height = 13
        Alignment = taRightJustify
        Caption = #1054#1090#1084#1077#1090#1082#1072' '#1086' '#1074#1088#1091#1095#1077#1085#1080#1080
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        ParentFont = False
      end
      object DBDateTimeEditEh1: TDBDateTimeEditEh
        Left = 142
        Top = 44
        Width = 79
        Height = 19
        AlwaysShowBorder = True
        DataField = 'WORKDATE'
        DataSource = dscToDo
        EditButtons = <>
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        Flat = True
        Kind = dtkDateEh
        ParentFont = False
        ShowHint = True
        TabOrder = 2
        Visible = True
      end
      object cbMaked: TDBCheckBoxEh
        Left = 142
        Top = 110
        Width = 97
        Height = 17
        AlwaysShowBorder = True
        Color = clBtnFace
        DataField = 'WORKSTATUS'
        DataSource = dscToDo
        Flat = True
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        ParentColor = False
        ParentFont = False
        TabOrder = 5
        ValueChecked = '1'
        ValueUnchecked = '0'
        OnClick = cbMakedClick
      end
      object cbAlarm: TDBCheckBoxEh
        Left = 142
        Top = 66
        Width = 97
        Height = 17
        AlwaysShowBorder = True
        Color = clBtnFace
        DataField = 'ALARM'
        DataSource = dscToDo
        Flat = True
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        ParentColor = False
        ParentFont = False
        TabOrder = 3
        ValueChecked = '1'
        ValueUnchecked = '0'
      end
      object lcbWordDesc: TDBLookupComboboxEh
        Left = 142
        Top = 0
        Width = 360
        Height = 19
        AlwaysShowBorder = True
        EditButtons = <>
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        Flat = True
        KeyField = 'ID'
        ListField = 'NAME'
        ListSource = MAINDM.dscWorkTypes
        ParentFont = False
        ShowHint = True
        Style = csDropDownEh
        TabOrder = 0
        Visible = True
      end
      object dbteMakedate: TDBDateTimeEditEh
        Left = 142
        Top = 154
        Width = 79
        Height = 19
        AlwaysShowBorder = True
        Color = clBtnFace
        DataField = 'MAKEDATE'
        DataSource = dscToDo
        EditButtons = <>
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        Flat = True
        Kind = dtkDateEh
        ParentFont = False
        ShowHint = True
        TabOrder = 7
        Visible = True
      end
      object lcbMaker: TDBLookupComboboxEh
        Left = 142
        Top = 132
        Width = 360
        Height = 19
        AlwaysShowBorder = True
        DataField = 'MAKEIT_ID'
        DataSource = dscToDo
        EditButtons = <>
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        Flat = True
        KeyField = 'ID'
        ListField = 'NAME'
        ListSource = MAINDM.dscCollectors
        ParentFont = False
        ShowHint = True
        TabOrder = 6
        Visible = True
      end
      object DBLookupComboboxEh1: TDBLookupComboboxEh
        Left = 142
        Top = 22
        Width = 360
        Height = 19
        AlwaysShowBorder = True
        DataField = 'WORKER_ID'
        DataSource = dscToDo
        EditButtons = <>
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        Flat = True
        KeyField = 'ID'
        ListField = 'NAME'
        ListSource = MAINDM.dscCollectors
        ParentFont = False
        ShowHint = True
        TabOrder = 1
        Visible = True
      end
      object DBEditEh4: TDBEditEh
        Left = 142
        Top = 86
        Width = 87
        Height = 19
        AlwaysShowBorder = True
        DataField = 'WORKSUMMA'
        DataSource = dscToDo
        EditButtons = <>
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        Flat = True
        ParentFont = False
        ShowHint = True
        TabOrder = 4
        Visible = True
      end
      object pGiven: TPanel
        Left = 146
        Top = 177
        Width = 195
        Height = 18
        BevelOuter = bvNone
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        ParentFont = False
        TabOrder = 8
        object cbNotGiven: TRadioButton
          Left = 1
          Top = 2
          Width = 86
          Height = 17
          Caption = #1054#1079#1085#1072#1082#1086#1084#1083#1077#1085
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'MS Sans Serif'
          Font.Style = []
          ParentFont = False
          TabOrder = 0
        end
        object cbGiven: TRadioButton
          Left = 86
          Top = 2
          Width = 69
          Height = 17
          Caption = #1042#1088#1091#1095#1077#1085#1086
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'MS Sans Serif'
          Font.Style = []
          ParentFont = False
          TabOrder = 1
        end
      end
    end
  end
  object GroupBox7: TGroupBox [3]
    Left = 0
    Top = 383
    Width = 590
    Height = 59
    Align = alBottom
    Caption = ' '#1057#1083#1091#1078#1077#1073#1085#1099#1077' '
    TabOrder = 3
    object Label20: TLabel
      Left = 20
      Top = 15
      Width = 43
      Height = 13
      Alignment = taRightJustify
      Caption = #1057#1086#1079#1076#1072#1085#1086
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object Label21: TLabel
      Left = 11
      Top = 37
      Width = 52
      Height = 13
      Alignment = taRightJustify
      Caption = #1048#1079#1084#1077#1085#1077#1085#1086
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object DBEditEh16: TDBEditEh
      Left = 68
      Top = 13
      Width = 121
      Height = 19
      AlwaysShowBorder = True
      Color = clBtnFace
      DataField = 'CREATEDATE'
      DataSource = dscToDo
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      ParentFont = False
      ReadOnly = True
      ShowHint = True
      TabOrder = 0
      Visible = True
    end
    object DBEditEh17: TDBEditEh
      Left = 190
      Top = 13
      Width = 73
      Height = 19
      AlwaysShowBorder = True
      Color = clBtnFace
      DataField = 'CREATOR'
      DataSource = dscToDo
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      ParentFont = False
      ReadOnly = True
      ShowHint = True
      TabOrder = 1
      Visible = True
    end
    object DBEditEh18: TDBEditEh
      Left = 190
      Top = 35
      Width = 73
      Height = 19
      AlwaysShowBorder = True
      Color = clBtnFace
      DataField = 'MODIFIER'
      DataSource = dscToDo
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      ParentFont = False
      ReadOnly = True
      ShowHint = True
      TabOrder = 2
      Visible = True
    end
    object DBEditEh19: TDBEditEh
      Left = 68
      Top = 35
      Width = 121
      Height = 19
      AlwaysShowBorder = True
      Color = clBtnFace
      DataField = 'MODIFYDATE'
      DataSource = dscToDo
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      ParentFont = False
      ReadOnly = True
      ShowHint = True
      TabOrder = 3
      Visible = True
    end
  end
  inherited PropStorageEh1: TPropStorageEh
    Section = 'crdToDo1'
  end
  inherited dsDebt: TpFIBDataSet
    UpdateTransaction = MAINDM.MainTransaction
    object dsDebtNAME: TFIBStringField
      FieldName = 'NAME'
      Size = 120
      EmptyStrToNull = True
    end
    object dsDebtADDRESS: TFIBStringField
      FieldName = 'ADDRESS'
      Size = 81
      EmptyStrToNull = True
    end
    object dsDebtSUMMA_CUR: TFIBBCDField
      FieldName = 'SUMMA_CUR'
      Size = 2
      RoundByScale = True
    end
  end
  object dsToDo: TpFIBDataSet
    UpdateSQL.Strings = (
      'UPDATE RST_TODO'
      'SET '
      '    DEBT_ID = :DEBT_ID,'
      '    WORKTYPE = :WORKTYPE,'
      '    WORKDESC = :WORKDESC,'
      '    WORKER_ID = :WORKER_ID,'
      '    WORKDATE = :WORKDATE,'
      '    WORKSTATUS = :WORKSTATUS,'
      '    MAKEIT_ID = :MAKEIT_ID,'
      '    MAKEDATE = :MAKEDATE,'
      '    NOTES = :NOTES,'
      '    ALARM = :ALARM,'
      '    WORKSUMMA = :WORKSUMMA,'
      'givenmark = :givenmark'
      'WHERE'
      '    ID = :OLD_ID'
      '    ')
    DeleteSQL.Strings = (
      'DELETE FROM'
      '    RST_TODO'
      'WHERE'
      '        ID = :OLD_ID'
      '    ')
    InsertSQL.Strings = (
      'INSERT INTO RST_TODO('
      '    DEBT_ID,'
      '    WORKTYPE,'
      '    WORKDESC,'
      '    WORKER_ID,'
      '    WORKDATE,'
      '    WORKSTATUS,'
      '    MAKEIT_ID,'
      '    MAKEDATE,'
      '    NOTES,'
      '    ALARM,'
      '    WORKSUMMA,'
      'givenmark'
      ')'
      'VALUES('
      '    :DEBT_ID,'
      '    :WORKTYPE,'
      '    :WORKDESC,'
      '    :WORKER_ID,'
      '    :WORKDATE,'
      '    :WORKSTATUS,'
      '    :MAKEIT_ID,'
      '    :MAKEDATE,'
      '    :NOTES,'
      '    :ALARM,'
      '    :WORKSUMMA,'
      ':givenmark'
      ')')
    RefreshSQL.Strings = (
      'select'
      '    rt.id,'
      '    rt.debt_id,'
      '    rt.worktype,'
      '    rt.workdesc,'
      '    rt.worker_id,'
      '    ul1.name as worker,'
      '    rt.workdate,'
      '    rt.workstatus,'
      '    rt.worksumma,'
      '    rt.makeit_id,'
      '    ul2.name as maker,'
      '    rt.makedate,'
      '    rt.notes,'
      '    rt.alarm,'
      '    rt.createdate,'
      '    cu.name as creator,'
      '    rt.modifydate,'
      '    mu.name as modifier,'
      'rt.givenmark'
      'from rst_todo rt'
      '  left join user_list ul1 on ul1.id = rt.worker_id'
      '  left join user_list ul2 on ul2.id = rt.makeit_id'
      '  left join user_list cu on cu.id = rt.createuserid'
      '  left join user_list mu on mu.id = rt.modifyuserid'
      'where(  rt.id = :ptodo_id'
      '     ) and (     RT.ID = :OLD_ID'
      '     )'
      '    ')
    SelectSQL.Strings = (
      'select'
      '    rt.id,'
      '    rt.debt_id,'
      '    rt.worktype,'
      '    rt.workdesc,'
      '    rt.worker_id,'
      '    ul1.name as worker,'
      '    rt.workdate,'
      '    rt.workstatus,'
      '    rt.worksumma,'
      '    rt.makeit_id,'
      '    ul2.name as maker,'
      '    rt.makedate,'
      '    rt.notes,'
      '    rt.alarm,'
      '    rt.createdate,'
      '    cu.name as creator,'
      '    rt.modifydate,'
      '    mu.name as modifier,'
      '    rt.givenmark'
      'from rst_todo rt'
      '  left join user_list ul1 on ul1.id = rt.worker_id'
      '  left join user_list ul2 on ul2.id = rt.makeit_id'
      '  left join user_list cu on cu.id = rt.createuserid'
      '  left join user_list mu on mu.id = rt.modifyuserid'
      'where rt.id = :ptodo_id'
      'order by rt.alarm desc, rt.workdate desc')
    Transaction = trCard
    Database = MAINDM.MainDB
    Left = 286
    Top = 88
    object dsToDoID: TFIBIntegerField
      FieldName = 'ID'
    end
    object dsToDoDEBT_ID: TFIBIntegerField
      FieldName = 'DEBT_ID'
    end
    object dsToDoWORKDESC: TFIBStringField
      FieldName = 'WORKDESC'
      Size = 255
      EmptyStrToNull = True
    end
    object dsToDoWORKER: TFIBStringField
      FieldName = 'WORKER'
      Size = 120
      EmptyStrToNull = True
    end
    object dsToDoWORKDATE: TFIBDateField
      FieldName = 'WORKDATE'
    end
    object dsToDoWORKSTATUS: TFIBSmallIntField
      FieldName = 'WORKSTATUS'
    end
    object dsToDoMAKER: TFIBStringField
      FieldName = 'MAKER'
      Size = 120
      EmptyStrToNull = True
    end
    object dsToDoMAKEDATE: TFIBDateField
      FieldName = 'MAKEDATE'
    end
    object dsToDoNOTES: TFIBStringField
      FieldName = 'NOTES'
      Size = 1000
      EmptyStrToNull = True
    end
    object dsToDoALARM: TFIBSmallIntField
      FieldName = 'ALARM'
    end
    object dsToDoCREATEDATE: TFIBDateField
      FieldName = 'CREATEDATE'
    end
    object dsToDoCREATOR: TFIBStringField
      FieldName = 'CREATOR'
      Size = 120
      EmptyStrToNull = True
    end
    object dsToDoMODIFYDATE: TFIBDateField
      FieldName = 'MODIFYDATE'
    end
    object dsToDoMODIFIER: TFIBStringField
      FieldName = 'MODIFIER'
      Size = 120
      EmptyStrToNull = True
    end
    object dsToDoWORKER_ID: TFIBIntegerField
      FieldName = 'WORKER_ID'
    end
    object dsToDoMAKEIT_ID: TFIBIntegerField
      FieldName = 'MAKEIT_ID'
    end
    object dsToDoWORKTYPE: TFIBIntegerField
      FieldName = 'WORKTYPE'
    end
    object dsToDoWORKSUMMA: TFIBBCDField
      FieldName = 'WORKSUMMA'
      Size = 2
      RoundByScale = True
    end
    object dsToDoGIVENMARK: TFIBSmallIntField
      FieldName = 'GIVENMARK'
    end
  end
  object dscToDo: TDataSource
    DataSet = dsToDo
    Left = 324
    Top = 88
  end
  object dsGetDebt: TpFIBDataSet
    SelectSQL.Strings = (
      'select'
      '    debt_id'
      'from'
      '    rst_todo '
      'where id = :ptodo_id')
    Transaction = trCard
    Database = MAINDM.MainDB
    Left = 286
    Top = 122
    object dsGetDebtDEBT_ID: TFIBIntegerField
      FieldName = 'DEBT_ID'
    end
  end
end
